import Vue from 'vue'
import Router from 'vue-router'
import Login from '../page/login.vue'
import home from '../page/home.vue'
import notFound from '../page/404.vue'

//客户管理
import customerlist from '@/page/customer/customerlist.vue'
import invoice from '@/page/customer/invoice.vue'
import customerinput from '@/page/customer/customerinput.vue'
import customerdetails from '@/page/customer/customerdetails.vue'
// 首页
import homePage from "@/page/homePage/index.vue";
//承运营商列表
import shipment from "@/page/shipment/index.vue";
import shipmentlist from "@/page/shipment/shipmentlist.vue";
import shipimport from "@/page/shipment/shipimport.vue";
import shipmentdetails from "@/page/shipment/shipmentdetails.vue";
//操作管理
import deliverythrough from "@/page/operation/deliverythrough.vue";
import deliveryquery from "@/page/operation/deliveryquery.vue";
//合同
import contract from "@/page/contract/index.vue";
import seecontract from "@/page/contract/seecontract.vue";
import contractimport from "@/page/contract/contractimport.vue";
import customerimport from "@/page/contract/customerimport.vue";
import customercontract from "@/page/contract/customercontract.vue";
//统计
import vehicle from "@/page/statistics/vehicle.vue";
import delivergoods from "@/page/statistics/delivergoods.vue";
import deliveringamount from "@/page/statistics/deliveringamount.vue";
import deliverycensus from "@/page/statistics/deliverycensus.vue";

//回单管理
import receipt from "@/page/receipt/index.vue";

//运单管理
import goodsnumbersee from "@/page/waybill/goodsnumbersee.vue";

//财务
import shipmentrecon from "@/page/finance/shipmentrecon.vue";
import invoicetoexamine from "@/page/finance/invoicetoexamine.vue";
import invoicelist from "@/page/finance/invoicelist.vue";

//系统设置
import consigneeinfo from "@/page/systemsetup/consigneeinfo.vue";
Vue.use(Router)

let routes = [
  {
    path: '/login',
    component: Login,
    name: '',
    hidden: true
  },
  {
    path: '/404',
    component: notFound,
    name: '',
    hidden: true
  },
  {
    path: '/',
    component: home,
    name: '首页',
    iconCls: 'icon1',
    children: [
      {
        path: '/homePage',
        component: homePage,
        name: '首页'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '客户管理',
    iconCls: 'icon2',
    children: [
      {
        path: '/customerdetails',
        component: customerdetails,
        name: '客户详情'
      },
      {
        path: '/customerinput',
        component: customerinput,
        name: '客户录入'
      },
      {
        path: '/customerlist',
        component: customerlist,
        name: '合约客户列表'
      },
      {
        path: '/invoice',
        component: invoice,
        name: '开票申请'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '承运营商管理',
    iconCls: 'icon3',
    children: [
      {
        path: '/shipmentlist',
        component: shipmentlist,
        name: '承运商列表'
      },
      {
        path: '/shipmentdetails',
        component: shipmentdetails,
        name: '承运商详情'
      },
      {
        path: '/shipment',
        component: shipment,
        name: '车辆管理'
      },
      {
        path: '/shipimport',
        component: shipimport,
        name: '承运商导入'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '运单管理',
    iconCls: 'icon4',
    children: [
      {
        path: '/goodsnumbersee',
        component: goodsnumbersee,
        name: '货物编码查看'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '回单管理',
    iconCls: 'icon5',
    children: [
      {
        path: '/receipt',
        component: receipt,
        name: '回单管理'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '操作管理',
    iconCls: 'icon6',
    children: [
      {
        path: '/deliveryquery',
        component: deliveryquery,
        name: '配货管理-查询'
      },
      {
        path: '/deliverythrough',
        component: deliverythrough,
        name: '配货操作-直达'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '财务管理',
    iconCls: 'icon7',
    children: [
      {
        path: '/invoicelist',
        component: invoicelist,
        name: '开票审核'
      },
      {
        path: '/shipmentrecon',
        component: shipmentrecon,
        name: '承运商对账单'
      },
      {
        path: '/invoicetoexamine',
        component: invoicetoexamine,
        name: '开票审核详情页'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '合同管理',
    iconCls: 'icon8',
    children: [
      {
        path: '/customercontract',
        component: customercontract,
        name: '客户合约合同'
      },
      {
        path: '/customerimport',
        component: customerimport,
        name: '客户合约合同导入'
      },
      {
        path: '/contractimport',
        component: contractimport,
        name: '承运商合同导入'
      },
      {
        path: '/contract',
        component: contract,
        name: '承运商合同'
      },
      {
        path: '/seecontract',
        component: seecontract,
        name: '查看合同'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '统计管理',
    iconCls: 'icon9',
    children: [
      {
        path: '/deliverycensus',
        component: deliverycensus,
        name: '配送统计'
      },
      {
        path: '/deliveringamount',
        component: deliveringamount,
        name: '发货量统计'
      },
      {
        path: '/delivergoods',
        component: delivergoods,
        name: '发货亏盈统计'
      },
      {
        path: '/vehicle',
        component: vehicle,
        name: '车辆管理'
      },
    ]
  },
  {
    path: '/',
    component: home,
    name: '车辆定位',
    iconCls: 'icon10',
    children: []
  },
  {
    path: '/',
    component: home,
    name: '系统管理',
    iconCls: 'icon11',
    children: [
      {
        path: '/consigneeinfo',
        component: consigneeinfo,
        name: '收货人信息库'
      },
    ]
  },
];
var router = new Router({
  routes
})
export default router;